# Maintainer: George Rawlinson <grawlinson@archlinux.org>
# Contributor: Yigit Sever <yigit at yigitsever dot com>
# Contributor: Qontinuum <qontinuum@artixlinux.org>
# Contributor: timetoplatypus <timetoplatypus@protonmail.com>
# Contributor: andychu <andy@oilshell.org>

pkgname=oil
pkgver=0.14.2
pkgrel=1
pkgdesc='A new Unix shell'
arch=('loong64' 'x86_64')
url='https://www.oilshell.org'
license=('Apache')
depends=('glibc' 'readline')
makedepends=('bash')
replaces=('osh')
install=oil.install
options=('!lto' '!strip')
source=("$url/download/$pkgname-$pkgver.tar.xz")
sha512sums=('2a43b155e51e345fb25f6515eaf7c09a1c2dbb497935551943839e38d464f598f14f1c97f51b757f4a9d18229d92bcb65c328f46679b77f9b2210b0c6bbd7786')
b2sums=('b18cd14937169aaea9ac9160be215f293a1923219c1187f2e5ebc027386b44f0530bc8b93110f47cef5b361677501b14bf1efe1b5bb0c062b4d0d23bf9e62b4d')

build() {
	cd "$pkgname-$pkgver"

	./configure \
    --prefix=/usr \
    --datarootdir=/usr/share

	make
}

package() {
	cd "$pkgname-$pkgver"

	make DESTDIR="$pkgdir" install
}
